package cn.lingyangwl.agile.dynamic.config.remote;

import cn.lingyangwl.agile.model.constants.ServiceCodeCons;
import cn.lingyangwl.agile.model.module.config.ConfigInfo;
import cn.lingyangwl.framework.core.response.Resp;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author shenguangyang
 */
@Lazy
@FeignClient(contextId = "remoteConfigService", url = "${server-url:}", value = ServiceCodeCons.SYSTEM_SERVICE)
//@ConditionalOnClass({FeignAutoConfiguration.class, NacosServiceAutoConfiguration.class})
public interface RemoteConfigManage {

    @ApiOperation(value = "获取使用的配置")
    @GetMapping("/config/getUseConfig")
    Resp<ConfigInfo> getUseConfig(@RequestParam("configDefine") String configDefine);
}
